//
//  HWSelecTtitleTableViewCell.m
//  HWanGame
//
//  Created by 陈道斌 on 2021/7/12.
//  Copyright © 2021 Chendaobin. All rights reserved.
//

#import "HWSelecTtitleTableViewCell.h"

@interface HWSelecTtitleTableViewCell()
//@property(strong,nonatomic) UIView *beijingyanSeView;
//@property(strong,nonatomic) UIImageView *biaoqianImageView;
//@property(strong,nonatomic) UILabel *biaotilabel;


@end

@implementation HWSelecTtitleTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier  {
  
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupUI];
    
    }
    
    
    return  self;
    
    
}

// 设置UI
- (void)setupUI {
    
    self.beijingyanSeView = [[UIView alloc] initWithFrame:CGRectMake(38, 14, kScreenW-38*2, 28)];
    self.beijingyanSeView.backgroundColor = RGB(240, 240, 240);
    self.beijingyanSeView.layer.cornerRadius = 6;
    self.beijingyanSeView.layer.masksToBounds = YES;
    [self.contentView addSubview: self.beijingyanSeView];
    
    
    self.biaoqianImageView = [[UIImageView alloc]initWithFrame:CGRectMake(19, 8, 12, 12)];
    self.biaoqianImageView.image = [UIImage imageNamed:@"xingyaoweixuanzhongyuanquan"];
    
    [self.beijingyanSeView addSubview:self.biaoqianImageView];
    
    
    self.biaotilabel = [[UILabel alloc]initWithFrame:CGRectMake(self.biaoqianImageView.right+ 15, 0,  self.beijingyanSeView.width -self.biaoqianImageView.right - 15-10, 28)];
    self.biaotilabel.text = @"北京？";
    self.biaotilabel.textAlignment =  NSTextAlignmentLeft;
    self.biaotilabel.textColor = RGB(51, 51, 51);
    self.biaotilabel.font = [UIFont systemFontOfSize:12];
//     self.biaotilabel.backgroundColor = [UIColor redColor];
    [self.beijingyanSeView  addSubview:  self.biaotilabel];
    
    
    self.ringbianButton = [UIButton setButtonWithFrame:CGRectMake(kScreenW-38*2-81, 0, 80, 28) Title:@"正确答案" Image:@"zhengquduigou" Font:12 Color:RGB(70, 188, 14) Target:self Selector:nil];
    [self.ringbianButton layoutButtonWithEdgeInsetsStyle:MKButtonEdgeInsetsStyleRight imageTitleSpace:5];
  //  [self.ringbianButton setImage:[UIImage imageNamed:@"xuanzecuowu"] forState:UIControlStateNormal];
    
    [self.beijingyanSeView addSubview:self.ringbianButton];
    
 
    
}




@end
